<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button onclick="login()">登录</button>
    <script>
        function login() {
            var xhr = new XMLHttpRequest()
            xhr.open('get', 'http://127.0.0.1:3000/login')
            xhr.send()
            xhr.onreadystatechange = function() {
                console.log(JSON.parse(xhr.responseText) )
            }
        }
    </script>
</body>
</html>